﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using WebSiteAdminTool.Web.Services.DTOs;
using WebSiteAdminTool.Web.Services.Utils;

namespace WebSiteAdminTool.Web.Services.Contracts
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IMembershipService" in both code and config file together.
    [ServiceContract]
    public interface IMembershipService
    {
        [OperationContract]
        UserData[] GetUsers(Constants.UserSearchCriteria searchBy, string value);

        [OperationContract]
        bool ValidateUser(string userName, string password);

        [OperationContract]
        string GenerateValidPassword();

        [OperationContract]
        string ResetPassword(object userId);

        [OperationContract]
        int GetNumberOfUsersOnline();

        [OperationContract]
        UserPasswordConstraintsData GetPasswordConstraints();

        [OperationContract]
        UserData CreateUser(UserData user, string password, string passwordAnswer);

        [OperationContract]
        UserData UpdateUser(UserData user);

        [OperationContract]
        bool RemoveUser(string userName, bool deleteAllrelatedData = false);
    }
}
